Skip to content

[spark] SparkFilterConverter: support AlwaysTrue/False, fix silent NaN drop#8060

Merged
JingsongLi merged 1 commit into
apache:masterfrom
heye1005:spark-filter-converter-todos
Jun 4, 2026
Merged

[spark] SparkFilterConverter: support AlwaysTrue/False, fix silent NaN drop#8060
JingsongLi merged 1 commit into
apache:masterfrom
heye1005:spark-filter-converter-todos

Conversation

@heye1005
Copy link
Copy Markdown
Contributor

@heye1005 heye1005 commented Jun 1, 2026

Purpose

fix two TODOs in SparkFilterConverter:

  • translate AlwaysTrue / AlwaysFalse
  • rewrite col = NaN to IsNaN(col) — Spark treats NaN = NaN as true, Paimon doesn't, so NaN rows were getting silently dropped on pushdown.

Tests

SparkFilterConverterTest#testAlwaysTrueFalse, #testEqualToNaN.

…rkFilterConverter

* Add AlwaysTrue / AlwaysFalse to the list of supported Spark filters
  and translate them to the corresponding Paimon predicates.
* Intercept EqualTo with a NaN Float/Double literal and push it down
  as an IsNaN predicate, since Spark's EqualTo treats NaN as equal to
  NaN while Paimon's equality predicate would not match any row.
* Drop the two obsolete TODOs covered by the changes above.
Copy link
Copy Markdown
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

@JingsongLi JingsongLi merged commit b5cbf23 into apache:master Jun 4, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants